package com.parktech.sun.domain.model.industryservice;

import com.parktech.sun.domain.model.BaseEntity;
import com.parktech.sun.domain.model.ContentEntity;

import javax.persistence.*;
import java.util.List;

/**
 * User: Think
 * Date: 11-1-12
 * Time: 下午10:15
 */
@Entity
@DiscriminatorValue("40")
public class IndustryServiceInformation extends ContentEntity {

    private List<IndustryServiceInformationAttachment> attachmentList;

    private IndustryServiceInfoCategory category;

    private IndustryService industryService;

    @OneToMany(fetch = FetchType.LAZY, mappedBy = "information", cascade = CascadeType.ALL)
    public List<IndustryServiceInformationAttachment> getAttachmentList() {
        return attachmentList;
    }

    public void setAttachmentList(List<IndustryServiceInformationAttachment> attachmentList) {
        this.attachmentList = attachmentList;
    }

    @ManyToOne
    public IndustryServiceInfoCategory getCategory() {
        return category;
    }

    public void setCategory(IndustryServiceInfoCategory category) {
        this.category = category;
    }

    @ManyToOne
    public IndustryService getIndustryService() {
        return industryService;
    }

    public void setIndustryService(IndustryService industryService) {
        this.industryService = industryService;
    }

    @Transient
    public String getLocation() {
        return "informations";
    }
}
